<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>内部发券记录</title>
		<link rel="stylesheet" href="css/reset.css" />
        <link rel="stylesheet" href="css/platform.css" />
        <link rel="stylesheet" href="js/ui/jquery-ui.min.css" />
        <link rel="stylesheet" href="css/table.css" />
        <!--<link rel="stylesheet" />-->
        <style>
            .export {
                text-align: right;
                margin-bottom: 10px;
            }
            .export .record-count {
                float: left;
            }
            .u-error {
                display: none;
            }
        </style>
	</head>

	<body>
		 <div class="header">
            <div class="u-title">内部发券记录</div>
        </div>
        <div class="main" ms-controller="mainController">
            <div class="u-multiform">
                <div class="column">
                    <div class="cell">
                        <label>工号：</label>
                        <div class="cnt-box">
                            <input class="u-ipt" placeholder="最多输入8位工号" maxlength="8" ms-duplex="staffId" />
                        </div>
                    </div>
                    <div class="cell">
                        <label>发券时间：</label>
                        <div class="cnt-box">
                            <input class="u-ipt ipt-datepicker" type="text" id="starttime" ms-duplex="startTime" />
                            <span class="split">-</span>
                            <input class="u-ipt ipt-datepicker" type="text" id="endtime" ms-duplex="endTime" />
                        </div>
                    </div>
                </div>
                <div class="column">
                    <label></label>
                    <button class="u-btn small search" ms-click="searchRecordList">查询</button>
                </div>
            </div>
            
            <div class="export">
                <div class="record-count" v-if="startTime!='' && endTime!=''">{{startTime}}~{{endTime}}，共发券{{recordCount}}张</div>
                <button class="u-btn small" ms-click="exportRecord()">导出明细</button>    
            </div>
            <div id="taskTable" ms-controller="taskTable"></div>
            <script type="avalon" id="tableTask">
                <div class="tableWrapper">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>券名称</th>
                                <th>工号</th>
                                <th>姓名</th>
                                <th>已发数量</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ms-repeat-row="sources">
                                <td>{{row.couponName}}</td>
                                <td>{{row.staffId}}</td>
                                <td>{{row.staffName}}</td>
                                <td>{{row.sendTimes}}</td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="4">
                                    <div class="pager">
                                        <div class="first-page" ms-click="firstpage" ms-class={{firstpagestyle}}>首页</div>
                                        <div class="pre-page" ms-click="prepage" ms-class={{prepagestyle}}>上一页</div>
                                        <div class="current-page">
                                            第<input class="current-page-num" type="text" ms-duplex="currentpage" ms-input="jumppage" />页
                                            <span class="totalpage">共 {{totalpage}} 页</span>
                                        </div>
                                        <div class="next-page" ms-click="nextpage" ms-class={{nextpagestyle}}>下一页</div>
                                        <div class="last-page" ms-click="lastpage" ms-class={{lastpagestyle}}>尾页</div>
                                        <div class="messageinfo">{{startrow}}-{{endrow}} 共{{total}}条</div>
                                    </div>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </script>
        </div>
        
        <!--弹框区域-->
        <div ms-controller="popController">
            <div class="u-popup" id="popup_add">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell dialog">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">新增黑名单</p>
                            <div class="container">
                                <div class="u-form">
                                    <div class="column">
                                        <label><span>*</span>工号：</label>
                                        <div class="cnt-box">
                                            <input ms-duplex="staffId" class="u-ipt" type="text" maxlength="8" ms-keyup="searchstaffName" />
                                            <p class="u-error staffid "></p>
                                        </div>
                                    </div>
                                    <div class="column">
                                        <label>姓名：</label>
                                        <input ms-duplex="staffName" readonly="readonly" placeholder="输入8位工号查出姓名"/>
                                    </div>
                                    <div class="column">
                                        <label><span>*</span>原因：</label>
                                        <div class="cnt-box">
                                            <textarea class="u-textarea" ms-duplex="reason"></textarea>
                                            <p class="u-error reason"></p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn" ms-click="addSure()">确定</button>
                                <button class="u-btn gray btn-close">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="u-popup" id="popup_confirm">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell alert">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">提示</p>
                            <div class="container">
                                <div class="warning"></div>
                                <p>确定要删除该任务吗？</p>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn" ms-click="confirmSure()">确定</button>
                                <button class="u-btn gray btn-close">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="u-popup" id="popup_tips">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell alert">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">提示</p>
                            <div class="container">
                                <div class="error"></div>
                                <p></p>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn btn-close">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="loadData"></div>
        <script src="js/jquery.min.js"></script>
        <script src="js/avalon.shim.sn.js"></script>
        <script src="js/swift-ui-table-1.1.js"></script>
        <script src="js/platform.js"></script>
        <script src="js/DataInterface/DataInterface.js"></script>
        <script src="js/ui/jquery-ui.min.js"></script>
        <script src="js/ui/jquery-ui-timepicker-addon.js"></script>
        
        <script src="js/recordlist.js"></script>
	</body>
</html>
